#!/bin/bash

# yum list installed puppet6-release.noarch &> /dev/null
# if [ $? != 0 ]; then
#     rpm -ivh http://yum.puppet.com/puppet6-release-el-7.noarch.rpm
# fi

packages=(
  # puppet-agent

  net-tools
  vim-enhanced
)

for pkg in "${packages[@]}"; do
  yum list installed ${pkg}
  if [ $? != 0 ]; then
    yum -y install ${pkg}
  fi
done